﻿<%@ Page Title="" Language="C#" MasterPageFile="~/HomeMain.master" AutoEventWireup="true" CodeFile="TinTuc.aspx.cs" Inherits="TinTuc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <div class="row">
        <div class="col-md-12">
            <ul class="breadcrumb">
                <li><a href="#"><span class="glyphicon glyphicon-home"></span></a></li>
                <li><a href="#">Tin tức công nghệ</a></li>
            </ul>
        </div>
    </div>
    <div class="row">
        <div class="col-md-8">
            <asp:Repeater ID="Repeater1" runat="server">
                <ItemTemplate>
                    <div class="news-item">
                        <h2>
                            <asp:HyperLink ID="TieuDe" runat="server" NavigateUrl='<%# Eval("Mabaiviet", "../ChiTietTinTuc.aspx?ma={0}") %>'
                                Text='<%# Eval("Tieude") %>'>
                            </asp:HyperLink>

                        </h2>
                        <p>
                            <span class="glyphicon glyphicon-user"></span>
                            <asp:Label ID="NguoiDang" runat="server" Text='<%# Eval("NguoiTao","Người Đăng : {0}") %>'></asp:Label>
                        </p>

                        <asp:Image ID="HinhAnh" runat="server" ImageUrl='<%# "~/"+Eval("Hinhanh") %>' />
                        <hr />
                        <p>
                            <asp:Label ID="MieuTa" runat="server" Text='<%# Eval("Tomtat") %>'></asp:Label>
                        </p>

                        <asp:HyperLink ID="HyperLink4" CssClass="btn btn-primary" runat="server" NavigateUrl='<%# Eval("Mabaiviet", "../ChiTietTinTuc.aspx?ma={0}") %>'>Xem Chi Tiết<span class="glyphicon glyphicon-chevron-right"></span></asp:HyperLink>
                        <hr />
                    </div>
                </ItemTemplate>
            </asp:Repeater>
            <!-- pager -->
            <div style="overflow: hidden;">
                <asp:Repeater ID="rptPages" runat="server"
                    OnItemCommand="rptPages_ItemCommand1">
                    <HeaderTemplate>
                        <ul class="pagination">
                            <li><a href="#">&laquo;</a></li>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <li>
                            <asp:LinkButton ID="btnPage"
                                CommandName="Page" CommandArgument="<%# Container.DataItem %>"
                                runat="server"><%# Container.DataItem %>
                            </asp:LinkButton></li>
                    </ItemTemplate>
                    <FooterTemplate>
                        <li><a href="#">&raquo;</a></li>
                        </ul>
                    </FooterTemplate>
                </asp:Repeater>
            </div>
        </div>

        <div class="col-md-4" style="padding-top: 30px;">
            <div class="panel panel-loiichky">
                <div class="panel-heading">
                    <h2 class="panel-title">Tin Hot</h2>
                </div>
                <div class="panel-body hotnews" style="padding: 0;">
                    <asp:Repeater ID="Repeater3" runat="server" DataSourceID="SqlDataSource1">
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLink1" runat="server" CssClass="hotnews-link"  NavigateUrl='<%# Eval("Mabaiviet", "../ChiTietTinTuc.aspx?ma={0}") %>'
                                Text='<%# Eval("Tieude") %>'></asp:HyperLink>
                        </ItemTemplate>
                    </asp:Repeater>
             <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                ConnectionString="<%$ ConnectionStrings:QLBSConnectionString %>"
                SelectCommand="SELECT * FROM [Baiviet] order by LuotXem desc"></asp:SqlDataSource>
                </div>
            </div>
        </div>
    </div>
</asp:Content>


